package com.slb.slnwp.common.exception;

/**
 * @创建人: joinly
 * @创建时间: 2021-10-10 17:36:44
 * @描述: 业务异常
 **/
public class BizException extends RuntimeException {

    /** 错误代码 **/
    private int code = 500;

    /** 业务数据 */
    private Object data;

    public int getCode() {
        return code;
    }

    public Object getData() {
        return data;
    }

    public BizException(int code) {
        this.code = code;
    }

    public BizException(String message) {
        super(message);
    }

    public BizException(String message, int code) {
        super(message);
        this.code = code;
    }

    public BizException(String message, int code, Object data) {
        super(message);
        this.code = code;
        this.data = data;
    }

}
